<%
layout("/include/_container.html",{title:"角色管理", parent:"单位组织"}){
%>
	<div class="row">
			<div id="left"  class="animated col-sm-12">
				<!-- 搜索框-->
				<div id="search-collapse" class="white-box collapse m-b-5">
					<a class="jp-ti-close close" onclick="$('#search-collapse').fadeToggle()">
						<i class="fa fa-times"></i>
					</a>
					<form id="searchForm"  class="form-inline" >
						<div class="form-group m-b-10 m-r-10">
							<label class="m-r-10" title="角色名称：">角色名称：</label>
							<input name="name"  maxlength="64"  class="form-control"/>
						</div>
						<div class="form-group m-b-10 m-r-10">
							<a  id="search" class="btn btn-custom waves-effect waves-light m-l-10 btn-md btn-rounded"><i class="fa fa-search"></i> 查询</a>
							<a  id="reset" class="btn btn-custom waves-effect waves-light m-l-10 btn-md btn-rounded" ><i class="fa fa-refresh"></i> 重置</a>
						</div>
					</form>
				</div>
				<div class="white-box">
					<!-- 工具栏 -->
					<div id="toolbar">
						<% if(shiro.hasPermission("sys:role:add")){ %>
							<button id="add" class="btn btn-custom waves-effect w-xs waves-light"  onclick="add()"><i class="fa fa-plus"></i> 新建</button>
						<% } %>
						<% if(shiro.hasPermission("sys:role:edit")){ %>
							<button id="edit" class="btn btn-white waves-effect w-xs waves-light" disabled onclick="edit()">
								<i class="fa fa-edit"></i> 修改
							</button>
						<% } %>
						<% if(shiro.hasPermission("sys:role:del")){ %>
							<button id="remove" class="btn btn-white waves-effect w-xs waves-light" disabled onclick="del()">
								<i class="fa fa-remove"></i> 删除
							</button>
						<% } %>
					</div>
					<!-- 工具栏结束 -->
						<!-- 表格 -->
						<table id="table" class="table-bordered"
						   data-toolbar="#toolbar"
						   data-id-field="id">
						</table>
				</div>
			</div>




		    <div  id="right" class="col-sm-6 p-l-0 hide">
				<div class="card">
				<div class="card-body">

					<a class="jp-ti-close close"  onclick="hideAssign()">
						<i class="fa fa-times"></i>
					</a>
					<h5>用户列表，所属角色: <label class="text-custom" id="roleLabel">敏捷开发</label><input type="hidden" id="roleId"/></h5>
				 <div id="userToolbar">
					<button id="assignButton"  class="btn btn-custom btn-trans waves-effect waves-custom w-xs" title="添加人员"><i class="fa fa-user-plus"></i> 添加人员</button>
				</div>
				 <!-- 表格 -->
			    <table id="userTable" class="table-bordered"
			           data-toolbar="#userToolbar"
			           data-id-field="id">
			    </table>
			    </div>
				</div>
			</div>
			
	  </div>
<% include("roleList.js"){} %>
<% include("role-userList.js"){} %>
<% } %>